package com.example.concurrent.demo.callable;

import java.util.concurrent.Callable;

/**
 * @author susc
 * @title: MyCallable
 * @projectName concurrent-demo
 * @description: TODO
 * @date 2021/9/2810:46
 */
public class MyCallable implements Callable<String> {

    @Override
    public String call() throws Exception {
        Thread.sleep(1000);
        // 返回执行当前Callable的线程名字
        return Thread.currentThread().getName();
    }
}
